﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MyVoteMVC.Data;
using MyVoteMVC.Domain;
using MyVoteMVC.Common;
using MyVoteMVC.Common.Objects;
using MyVoteMVC.Data.Repositories;

namespace MyVoteMVC.Service
{
    public interface IActivityService : IDisposable
    {

        //显示当前的投票活动情况（总共有多少人参与该投票活动、活动开始和结束时间）
        IList<VT_Activities> GetActivitiesList(DateTime dtStartTime, DateTime dtEndTime);

        IList<VT_Activities> GetActivitiesList(DateTime dtTime);
        //进入活动后，可以显示投票活动的人气情况，即各个投票项的浏览人数或参与人数。
        VT_Activities GetActivities(string Activity_ID);

        VT_Activities GetActivities(string Activity_ID, string Activity_PID);

        //用户可以查看所有投票活动，包括现有和历史的投票活动,获取历史的投票活动
        IList<VT_Activities> GetHistoryActivitiesList(DateTime dtEndTime);

        //查看用户参加过已结束的活动
        IList<VT_Activities> GetUserHistoryActivitiesList(string userID,DateTime dtEndTime);

        //查看用户参加过没有结束的活动
        IList<VT_Activities> GetUserNowActivitiesList(string userID,DateTime dtEndTime);

        //查看用户没有参加已结束的活动 
        IList<VT_Activities> GetNotUserHistoryActivitiesList(string userID,DateTime dtEndTime);

        //查看用户没有参加没有结束的活动
        IList<VT_Activities> GetNotUserNowActivitiesList(string userID,DateTime dtEndTime);

        //用户查看历史活动，普通用户不能查看二次活动，领导可以查看二次活动
        IList<VT_Activities> GetHistoryActivitiesList(string userID);

        //用户查看当前活动，普通用户不能查看二次活动，领导可以查看二次活动
        IList<VT_Activities> GetNowActivitiesList(string userID);

        //返回参加该活动的所有用户
        IList<VT_Users> GetUserJoinActivites(string activityID);

        IList<VT_Users> GetUserJoinActivitesNoLottery(string activityID);

        //添加活动
        string AddActivity(string activityPID, string activityTitle, string activityContent, DateTime activityStartTime, DateTime activityEndTime, int activityIfShowUser, int activityIfReadAll, int activityIfMultiSubmit, string createdBy, byte[] activityImage);

        //添加活动
        string AddActivity(string activityPID, string activityTitle, string activityContent, DateTime activityStartTime, DateTime activityEndTime, int activityIfShowUser, int activityIfReadAll, int activityIfMultiSubmit, string createdBy);

        //删除活动
        bool DeleteActivity(string activityID);
        //修改活动
        bool ModifyActivity(string activityID, string activityTitle, string activityContent, DateTime activityStartTime, DateTime activityEndTime, int activityIfShowUser, int activityIfReadAll, int activityIfMultiSubmit, string updateBy);

        bool AddActivityViewCount(string activityID);
        /// <summary>
        /// 获取一个不涉及业务修改的活动对象
        /// </summary>
        /// <param name="Activity_ID"></param>
        /// <returns></returns>
        VT_Activities GetActivityByIdWhenAdmin(string Activity_ID);
        /// <summary>
        /// 获取所有的活动
        /// </summary>
        /// <returns></returns>
        IList<VT_Activities> GetActivities();

        bool CheckActivity(string Activity_ID);
    }
}